Skip to content

Optimize alert and pool health selectors#994

Open
copp1723 wants to merge 1 commit into
eigenwallet:masterfrom
copp1723:codex-ui-selector-rerender-fix
Open

Optimize alert and pool health selectors#994
copp1723 wants to merge 1 commit into
eigenwallet:masterfrom
copp1723:codex-ui-selector-rerender-fix

Conversation

@copp1723
Copy link
Copy Markdown

Summary

  • Memoize the unacknowledged-alert list with createSelector so useAlerts() returns the same array while alert state is unchanged.
  • Split MoneroPoolHealthBox into primitive selectors instead of returning a new wrapper object from useAppSelector.

Why

This targets the UI performance bounty in #727.

The previous useAlerts() selector filtered inside useAppSelector, allocating a new array on every Redux store update. MoneroPoolHealthBox also returned a fresh object from its selector on every update. Both patterns can make React-Redux treat unrelated store changes as changed selector output and re-render subscribers unnecessarily.

Testing

  • eslint src/store/hooks.ts src/store/selectors.ts src/renderer/components/pages/help/MoneroPoolHealthBox.tsx
  • git diff --check

Notes:

  • yarn tsc is blocked in this local clone because src/models/tauriModel.ts is generated and gitignored. The repo README says to generate it with typeshare + dprint; this machine does not currently have cargo, typeshare, or dprint installed.

@Einliterflasche
Copy link
Copy Markdown

Per our AI policy we require all communication to be exclusively human written. Until this requirement is met, we can't spare the effort to review this.

@Einliterflasche Einliterflasche marked this pull request as draft May 11, 2026 09:33
@copp1723 copp1723 marked this pull request as ready for review May 11, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants